<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>Animation</title>
    <script type="text/javascript" src="esl.js"></script>
</head>
<body>
    <script type="text/javascript">
    require.config({
        packages: [
            {
                name: 'zrender',
                location: '../src',
                main: 'zrender'
            }
        ]
    });

    require(["zrender/core/arrayDiff"], function(arrayDiff) {
        // console.log(arrayDiff('abcde', 'bcdkeabc'));
        // var arr0 = [{"name":"类目12"},{"name":"类目13"},{"name":"类目14"},{"name":"类目15"},{"name":"类目16"},{"name":"类目17"}];
        // var arr1 = [{"name":"类目11"},{"name":"类目12"},{"name":"类目13"},{"name":"类目14"},{"name":"类目15"},{"name":"类目16"}];
        // console.log(arrayDiff(arr0, arr1, function (a, b) {
        //     return a.name === b.name;
        // }));
        var data1 = [];
        var data2 = [];
        for (var i = 0; i < 1000; i++) {
            data1.push(i);
        }
        var data2 = data1.slice();
        data2.shift();
        data2.push(i);
        // console.log(data1, data2);
        console.profile('diff');
        arrayDiff(data1, data2);
        console.profileEnd('diff');
    });
    </script>
    <div id="Main" style="width:600px;height:400px;"></div>
</body>
</html>